<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RevisionsView.ascx.cs" Inherits="SubversionReports.Web.Controls.RevisionsView" %>

<%@ Register TagPrefix="uc" TagName="PageLinks" Src="~/Controls/PageLinks.ascx" %>
<%@ Register TagPrefix="uc" TagName="RevisionsFilters" Src="~/Controls/RevisionsFilters.ascx" %>

<h2>Browsing subversion repository at: <asp:Literal runat="server" ID="RepositoryTitle" /></h2>
<p><asp:Literal runat="server" ID="RepositoryDescription" /></p>

<uc:RevisionsFilters runat="server" ID="RevisionsFilters1" />
<uc:PageLinks runat="server" ID="PageLinks1" />
<asp:GridView runat="server" ID="RevisionsGridView" AutoGenerateColumns="false" AlternatingRowStyle-BackColor="#eeeeee" BorderColor="White" BorderStyle="Solid" HeaderStyle-BackColor="Black" HeaderStyle-ForeColor="White" Width="100%">
    <Columns>
        <asp:TemplateField HeaderText="Revision" ItemStyle-Width="60px">
            <ItemTemplate>
                <asp:HyperLink runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Id") %>' NavigateUrl='<%# string.Format("{0}?RevisionId={1}", Request.FilePath, DataBinder.Eval(Container.DataItem, "Id")) %>' />
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Date" ItemStyle-Width="70px">
            <ItemTemplate>
                <%# ((DateTime)DataBinder.Eval(Container.DataItem, "Date")).ToString("dddd")%><br />
                <%# ((DateTime)DataBinder.Eval(Container.DataItem, "Date")).ToShortDateString() %><br />
                <%# ((DateTime)DataBinder.Eval(Container.DataItem, "Date")).ToShortTimeString() %>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Author" ItemStyle-Width="60px" ItemStyle-HorizontalAlign="Center">
            <ItemTemplate>
                <asp:Image runat="server" ImageUrl='<%# GetAuthorIconUrl((string)DataBinder.Eval(Container.DataItem, "Author")) %>' /><br />
                <asp:Label runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Author") %>' />
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Changes">
            <ItemTemplate>
                <em><asp:Label runat="server" Text='<%# HttpUtility.HtmlEncode((string)DataBinder.Eval(Container.DataItem, "Comment")) %>' /></em><br />
                <%# DataBinder.Eval(Container.DataItem, "Summary") %>
                <%--<asp:BulletedList runat="server" DataSource='<%# DataBinder.Eval(Container.DataItem, "Paths") %>' DataTextField="ChangeDescription" />--%>
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
</asp:GridView>
<uc:PageLinks runat="server" ID="PageLinks2" />